<?php 

function distribuicao($str){
	$arr = str_split(strtolower($str));
	$d = array();
	$count = count($arr);
	for($i = 0; $i < $count; $i++){
		$d[$arr[$i]]=1+$d[$arr[$i]];
		
	}
	foreach ($d as $k => $v) {
		$perc = 100*$d[$k]/$count;
		echo utf8_encode("$k : $d[$k] : $perc% <br>");
	} 
}
distribuicao("Education in its broadest, general sense is the means through which the aims and habits of a group of people lives on from one generation to the next. Generally, it occurs through any experience that has a formative effect on the way one thinks, feels, or acts. In its narrow, technical sense, education is the formal process by which society deliberately transmits its accumulated knowledge, skills, customs and values from one generation to another, e.g., instruction in schools. (Wikipedia).");
?>